﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Manager/Manager.Master" AutoEventWireup="true" CodeBehind="ManLoaiNhaDat.aspx.cs" Inherits="BatDongSan.Manager.ManLoaiNhaDat" Theme="cvkadmin" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphBody" runat="server">
    <asp:Label ID="lbStatus" runat="server" Font-Italic="True" ForeColor="#FF3300"></asp:Label>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
        <div>
        <table border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td>
                    Nhà đất:
                </td>
                <td>
                    <asp:DropDownList ID="ddlNhaDat" runat="server" AutoPostBack="true"
                        onselectedindexchanged="ddlNhaDat_SelectedIndexChanged">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    Loại Nhà đất:
                </td>
                <td>
                    <asp:TextBox ID="txtLoaiNhaDat" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="padding:10px 10px 30px 0px;">
                    <asp:Button ID="btActiveLoaiNhaDat" runat="server" onclick="btActiveLoaiNhaDat_Click"/>
                </td>
            </tr>
        </table>
    </div>
        <div style="font-weight:bold;">
        Danh sách Loại nhà đất
    </div>
        <div>
       <asp:GridView ID="grvLoaiNhaDat" runat="server" AutoGenerateColumns="False" CssClass="TMain"
            BorderStyle="Solid" BorderWidth="1px" CellPadding="4" GridLines="Vertical" Width="100%"
            OnRowDataBound="grvLoaiNhaDat_RowDataBound" AllowPaging="True" 
            onpageindexchanging="grvLoaiNhaDat_PageIndexChanging" PageSize="30">
            <RowStyle CssClass="TItem" />
            <Columns>
                <asp:TemplateField HeaderText="STT">
                    <ItemTemplate>
                        <asp:Label ID="lblSTT" runat="server" Text='<%# Container.DataItemIndex+1 %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" Width="10px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Id" InsertVisible="False" Visible="false">
                    <ItemTemplate>
                        <asp:Label ID="lblId" runat="server" Text='<%# Eval("Id") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Loại nhà đất">
                    <ItemTemplate>
                        <img src="/App_Themes/cvkadmin/images/news.jpg" /><asp:HyperLink ID="hplName" ToolTip="Click vào đây để Edit mẩu tin này" Font-Underline="false" runat="server" Text='<%# Eval("Name") %>'></asp:HyperLink>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Nhà đất">
                    <ItemTemplate>
                        <img src="/App_Themes/cvkadmin/images/news.jpg" /><asp:HyperLink ID="hplProvince" ToolTip="Click vào đây để Edit mẩu tin này" Font-Underline="false" runat="server"></asp:HyperLink>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Thứ tự">
                    <ItemTemplate>
                        <asp:TextBox ID="txtPosition" runat="server" Width="50" />
                    </ItemTemplate>
                    <ItemStyle Width="50px"></ItemStyle>
                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Top" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="#Ẩn" Visible="true">
                    <ItemTemplate>
                        <asp:LinkButton ID="lnkbtActive" Font-Bold="true" Font-Underline="false" runat="server"
                            CausesValidation="False" OnClick="lnkbtActive_Click"></asp:LinkButton>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Top" Width="30px" />
                </asp:TemplateField>
                <asp:TemplateField ShowHeader="False" HeaderText="Xóa">
                    <ItemTemplate>
                        <asp:LinkButton ID="lnkbtDelete" runat="server" CausesValidation="False" Text="Xóa"
                            OnClick="lnkbtDelete_Click"></asp:LinkButton>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Top" Width="30px" />
                </asp:TemplateField>
            </Columns>
            <FooterStyle CssClass="TFooter" />
            <PagerStyle CssClass="TFooter" HorizontalAlign="Right" />
            <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
            <HeaderStyle CssClass="THeader" />
            <AlternatingRowStyle CssClass="TItemA" />
        </asp:GridView>
    </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <div style="padding:10px 0 10px 0">
        <asp:Button ID="btUpdatePosition" runat="server" Text="Cập nhật vị trí" 
            onclick="btUpdatePosition_Click" />
    </div>
</asp:Content>
